package com.aspose.cells;

public class ChartFrame {
   byte[] a;
   byte[] b;
   zpx c = null;
   boolean d = true;
   boolean e = true;
   private byte l;
   private boolean m = false;
   private boolean n = false;
   private boolean o = false;
   private int p;
   private int q;
   private int r;
   private int s;
   private int t;
   private int u;
   private int v;
   private int w;
   private int x;
   private int y;
   private int z;
   private int A;
   private int B;
   private Chart C;
   private Line D;
   private Area E;
   protected Font f;
   protected int g = -1;
   protected boolean h = true;
   protected int i = 0;
   boolean j = true;
   boolean k;
   private boolean F = true;
   private zbst G;
   private ShapePropertyCollection H;
   private int I = 0;

   void a(Object var1) {
      this.F = false;
   }

   public boolean isInnerMode() {
      return (this.l & 255 & 16) != 0;
   }

   public void setInnerMode(boolean value) {
      if (value) {
         this.l = (byte)(this.l | 16);
      } else {
         this.l = (byte)(this.l & 239);
      }

   }

   boolean b() {
      return (this.l & 255 & 1) != 0;
   }

   void a(boolean var1) {
      if (var1) {
         this.l = (byte)(this.l | 1);
      } else {
         this.l = (byte)(this.l & 254);
      }

   }

   boolean c() {
      return (this.l & 255 & 2) != 0;
   }

   void b(boolean var1) {
      if (var1) {
         this.l = (byte)(this.l | 2);
      } else {
         this.l = (byte)(this.l & 253);
      }

   }

   void c(boolean var1) {
      if (var1) {
         this.l = (byte)(this.l | 4);
      } else {
         this.l = (byte)(this.l & 251);
      }

   }

   void d(boolean var1) {
      if (var1) {
         this.l = (byte)(this.l | 8);
      } else {
         this.l = (byte)(this.l & 247);
      }

   }

   public Chart getChart() {
      return this.C;
   }

   ChartFrame(Chart chart) {
      this.C = chart;
   }

   int d() {
      return this.B;
   }

   void b(int var1) {
      this.B = var1;
   }

   public Line getBorder() {
      if (this.D == null) {
         boolean var1 = this.F;
         this.D = new Line(this.C, this);
         if (this instanceof DataLabels) {
            this.D.setVisible(false);
         }

         this.F = var1;
      }

      return this.D;
   }

   Line e() {
      return this.D;
   }

   public Area getArea() {
      if (this.E == null) {
         boolean var1 = this.F;
         this.E = new Area(this.C, this);
         if (this instanceof DataLabels) {
            this.E.setFormatting(1);
         }

         this.F = var1;
      }

      return this.E;
   }

   Area f() {
      return this.E;
   }

   /** @deprecated */
   public Font getTextFont() {
      return this.getFont();
   }

   public Font getFont() {
      if (this.f == null) {
         this.f = new Font(this.C.j(), (Object)null, true);
         this.f.a(10.0D);
         Font var1 = null;
         if (this.g != -1) {
            var1 = this.getChart().j().j(this.g);
            this.f.c(var1);
            this.f.b.b(true);
            zbi var2 = this.getChart().c(this.g);
            if (var2 != null) {
               zbi var3 = new zbi(var2.f, 0, false);
               var3.a(var2);
               this.f.a((Object)var3);
            }
         } else {
            if (this.C.j().n().k() && this instanceof Title) {
               Title.a(this.C, this.f, !(((Title)this).v instanceof Axis));
               return this.f;
            }

            var1 = this.C.getChartArea().getFont();
            this.f.c(var1);
            if (this.getAutoScaleFont()) {
               this.f.a((Object)(new zbi(this.getChart(), 10, true)));
            }
         }

         return this.f;
      } else {
         return this.f;
      }
   }

   Font g() {
      return this.f == null && this.g != -1 ? this.C.j().j(this.g) : this.f;
   }

   int h() {
      return this.g;
   }

   void c(int var1) {
      this.g = var1;
   }

   public boolean getAutoScaleFont() {
      return this.h;
   }

   public void setAutoScaleFont(boolean value) {
      if (this.h != value) {
         if (value) {
            if (this.f != null) {
               zbi var2 = new zbi(this.C, this.f.getSize(), true);
               this.f.a((Object)var2);
            }
         } else {
            this.getFont().a((Object)null);
         }

         this.h = value;
      }
   }

   void a(boolean var1, zbi var2) {
      this.h = var1;
      if (var1) {
         if (this.f != null) {
            this.f.a((Object)var2);
         }
      } else if (this.f != null) {
         this.f.a((Object)null);
      }

   }

   public int getBackgroundMode() {
      return this.i;
   }

   public void setBackgroundMode(int value) {
      this.i = value;
   }

   /** @deprecated */
   public int getBackground() {
      return this.i;
   }

   /** @deprecated */
   public void setBackground(int value) {
      this.i = value;
   }

   void d(int var1) {
      this.i = var1;
   }

   boolean i() {
      return this.d && this.e;
   }

   boolean j() {
      return this.d;
   }

   void e(boolean var1) {
      this.d = var1;
   }

   boolean k() {
      return this.e;
   }

   void f(boolean var1) {
      this.e = var1;
   }

   boolean l() {
      return this.j;
   }

   void g(boolean var1) {
      this.j = var1;
      if (!var1) {
         this.h(false);
      }

   }

   public boolean isAutomaticSize() {
      return this.l();
   }

   public void setAutomaticSize(boolean value) {
      this.g(value);
   }

   public int getX() {
      return this.x;
   }

   public void setX(int value) {
      this.x = value;
      this.h(false);
      this.d = false;
      this.a(true);
      this.m = true;
   }

   void e(int var1) {
      this.x = var1;
   }

   int m() {
      return this.x;
   }

   public int getY() {
      return this.y;
   }

   public void setY(int value) {
      this.y = value;
      this.h(false);
      this.e = false;
      this.d = false;
      this.a(true);
      this.m = true;
   }

   void f(int var1) {
      this.y = var1;
   }

   int n() {
      return this.y;
   }

   public int getHeight() {
      return this.z;
   }

   public void setHeight(int value) {
      this.z = value;
      this.h(false);
      this.j = false;
      this.m = true;
   }

   int o() {
      return this.z;
   }

   void g(int var1) {
      this.z = var1;
   }

   public int getWidth() {
      return this.A;
   }

   public void setWidth(int value) {
      this.A = value;
      this.h(false);
      this.j = false;
      this.m = true;
   }

   void h(int var1) {
      this.A = var1;
   }

   int p() {
      return this.A;
   }

   void a(int var1, int var2, int var3, int var4) {
      this.x = var1;
      this.y = var2;
      this.A = var3;
      this.z = var4;
   }

   public boolean getShadow() {
      return this.k;
   }

   public void setShadow(boolean value) {
      if (this.k != value) {
         this.h(false);
      }

      this.k = value;
   }

   boolean q() {
      return this.F;
   }

   void h(boolean var1) {
      this.F = var1;
   }

   void a(ChartFrame var1, CopyOptions var2) {
      this.F = var1.F;
      if (var1.E != null) {
         this.E = null;
         this.getArea().a(var1.E, var2);
      } else {
         this.E = null;
      }

      if (var1.D != null) {
         this.D = null;
         this.getBorder().a(var1.D);
      } else {
         this.D = null;
      }

      this.h = var1.h;
      this.i = var1.i;
      this.g = -1;
      if (var1.f != null || var1.g != -1) {
         this.f = new Font(this.C.j(), (Object)null, true);
         this.f.c(var1.getFont());
         if (var1.getFont().c() != null && var1.h) {
            zbi var3 = (zbi)var1.getFont().c();
            zbi var4 = new zbi(this.C, 0, false);
            var4.a(var3);
            this.f.a((Object)var4);
         }
      }

      this.z = var1.z;
      this.A = var1.A;
      this.x = var1.x;
      this.y = var1.y;
      this.d = var1.d;
      this.e = var1.e;
      this.j = var1.j;
      this.k = var1.k;
      this.l = var1.l;
      this.t = var1.t;
      this.u = var1.u;
      this.v = var1.v;
      this.w = var1.w;
      this.o = var1.o;
      this.p = var1.p;
      this.q = var1.q;
      this.r = var1.r;
      this.s = var1.s;
      this.n = var1.n;
      this.m = var1.m;
      if (var1.G != null) {
         this.G = new zbst();
         this.G.a = var1.G.a;
         this.G.b = var1.G.b;
         this.G.c = var1.G.c;
         this.G.d = var1.G.d;
      }

      if (var1.H != null) {
         this.H = new ShapePropertyCollection(this.C, this, 11);
         this.H.a(var1.H, var2);
      }

      this.c = var1.c;
      this.B = var1.B;
      this.a = var1.a;
      this.b = var1.b;
   }

   void b(ChartFrame var1, CopyOptions var2) {
      this.F = var1.F;
      if (var1.E != null) {
         this.E = null;
         this.getArea().a(var1.E, var2);
      } else {
         this.E = null;
      }

      if (var1.D != null) {
         this.D = null;
         this.getBorder().a(var1.D);
      } else {
         this.D = null;
      }

      if (var1.H != null) {
         this.H = new ShapePropertyCollection(this.C, this, 11);
         this.H.a(var1.H, var2);
      }

   }

   boolean a(ChartFrame var1) {
      if (this.F != var1.F) {
         return false;
      } else if (this.h != var1.h) {
         return false;
      } else if (this.i != var1.i) {
         return false;
      } else if (this.g != var1.g) {
         return false;
      } else if (this.z != var1.z) {
         return false;
      } else if (this.A != var1.A) {
         return false;
      } else if (this.x != var1.x) {
         return false;
      } else if (this.y != var1.y) {
         return false;
      } else if (this.d != var1.d) {
         return false;
      } else if (this.e != var1.e) {
         return false;
      } else if (this.j != var1.j) {
         return false;
      } else if (this.k != var1.k) {
         return false;
      } else if (this.l != var1.l) {
         return false;
      } else if (this.t != var1.t) {
         return false;
      } else if (this.u != var1.u) {
         return false;
      } else if (this.v != var1.v) {
         return false;
      } else if (this.w != var1.w) {
         return false;
      } else if (this.o != var1.o) {
         return false;
      } else if (this.p != var1.p) {
         return false;
      } else if (this.q != var1.q) {
         return false;
      } else if (this.r != var1.r) {
         return false;
      } else if (this.s != var1.s) {
         return false;
      } else if (this.n != var1.n) {
         return false;
      } else if (this.m != var1.m) {
         return false;
      } else {
         if (this.G != null && var1.G != null) {
            if (this.G.a != var1.G.a) {
               return false;
            }

            if (this.G.b != var1.G.b) {
               return false;
            }

            if (this.G.c != var1.G.c) {
               return false;
            }

            if (this.G.d != var1.G.d) {
               return false;
            }
         }

         return true;
      }
   }

   zbst r() {
      return this.G;
   }

   void a(zbst var1) {
      this.G = var1;
   }

   public ShapePropertyCollection getShapeProperties() {
      if (this.H == null) {
         this.H = new ShapePropertyCollection(this.C, this, 11);
      }

      return this.H;
   }

   boolean s() {
      return this.m;
   }

   void i(boolean var1) {
      this.m = var1;
   }

   public boolean isDefaultPosBeSet() {
      return this.o;
   }

   public int getDefaultX() {
      return this.t;
   }

   public int getDefaultY() {
      return this.u;
   }

   public int getDefaultWidth() {
      return this.v;
   }

   public int getDefaultHeight() {
      return this.w;
   }

   void b(int var1, int var2, int var3, int var4) {
      this.o = true;
      this.t = var1;
      this.u = var2;
      this.v = var3;
      this.w = var4;
   }

   boolean t() {
      return this.n;
   }

   int u() {
      return this.p;
   }

   void i(int var1) {
      this.n = true;
      this.a(false);
      this.p = var1;
   }

   int v() {
      return this.q;
   }

   void j(int var1) {
      this.n = true;
      this.b(false);
      this.q = var1;
   }

   int w() {
      return this.r;
   }

   void k(int var1) {
      this.r = var1;
   }

   int x() {
      return this.s;
   }

   void l(int var1) {
      this.s = var1;
   }

   int y() {
      return this.I;
   }

   void m(int var1) {
      this.I = var1;
   }

   public void setPositionAuto() {
      this.e(true);
      this.f(true);
      this.g(true);
   }
}
